<div id="wrapper_container">
    <!--Banner post-->
    <div class="banner_960 w960 mar_left_10">
    <?php if ( $this->scheduleOpen ) {?>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="960" height="240">
            <param name="movie" value="<?php echo FLASH_URL_CLUB;?>/banner_960x240.swf?clickTAG=<?php echo $this->scheduleOpen?urlencode($this->MakeUrlSite(7, null)):'javascript:showScheduleClose();';?>">
            <param name="allowFullScreen" value="true" />
            <param name="allowscriptaccess" value="always" />
            <param name="wmode" value="transparent" />
            <embed width="960" height="240" wmode="transparent" allowscriptaccess="always" allowfullscreen="true" quality="high" bgcolor="#000000" name="video-bb-player" id="video-bb-player" style="" src="<?php echo FLASH_URL_CLUB;?>/banner_960x240.swf?clickTAG=<?php echo $this->scheduleOpen?urlencode($this->MakeUrlSite(7, null)):'javascript:showScheduleClose();';?>" type="application/x-shockwave-flash" />
        </object>
    <?php } else {?>
        <img src="<?php echo IMAGE_URL_CLUB;?>/graphics/banner_960x240_keuthuc.jpg" width="960" height="240" />
    <?php }//end if?>
    </div>
    <div class="w980 left">
        <div id="col_left" class="w650 left pad_left_10">
            <!--Hot article-->
        <?php if ( !empty($this->arrArticleHot) && is_array($this->arrArticleHot) ) {?>
            <div id="silde_tinnoibat">
                <div class="CarouSlide s1">
                    <ul class="slider-holder">
                    <?php
                    $indexHot   = 1;
                    foreach ( $this->arrArticleHot as $key=>$row )
                    {
                    ?>
                        <li id="a<?php echo $indexHot;?>">
                            <h2><a href="<?php echo $this->MakeUrlSite(1, array('title'=>$row['title'], 'id'=>$row['articleid']));?>" title="<?php echo $this->escape($row['title']);?>"><?php echo $this->escape($row['title']);?></a></h2>
                            <div class="data">
                            <?php if ( !empty($row['image']) ) {?>
                                <a href="<?php echo $this->MakeUrlSite(1, array('title'=>$row['title'], 'id'=>$row['articleid']));?>" title="<?php echo $this->escape($row['title']);?>"><img src="<?php echo UPLOAD_URL_CLUB.$row['image'];?>" align="absmiddle" width="150" height="115" title="<?php echo $this->escape($row['title']);?>" /></a>
                            <?php }//end if?>
                                <?php echo Util_Truncate::truncateHTML($row['content'], 300);?>
                            </div>
                            <div class="source">
                                <p>Gửi bởi: <a class="widget" href="<?php echo BANBE_URL;?>/<?php echo $row['userid'];?>/profile" rel="FPTD_<?php echo $row['userid'];?>?sub=20" target="_blank"></a> | <?php echo $this->DateTimeDiff($row['creation_time']);?> | <label><?php echo $row['total_view'];?></label> lượt xem | <label><?php echo $row['total_vote'];?></label> bình chọn</p>
                            </div>
                        </li>
                    <?php
                        $indexHot++;
                    }//end foreach
                    ?>
                    </ul>
                    <ul class="slider-nav">
                    <?php
                    $indexHot   = 1;
                    foreach ( $this->arrArticleHot as $key=>$row )
                    {
                    ?>
                        <li <?php echo ($indexHot==1)?'class="active"':'';?>><a href="#a<?php echo $indexHot;?>" title="<?php echo $this->escape($row['title']);?>" onclick="HomeActicle.activeHot(this);"><span></span><?php echo $this->escape(Util_Truncate::truncateHTML($row['title'], 35));?></a></li>
                    <?php
                        $indexHot++;
                    }//end foreach
                    ?>
                    </ul>
                </div>
            </div>
        <?php }//end if?>

            <!--New article-->
        <?php
        if ( $this->arrArticlePost['total']>0 && !empty($this->arrArticlePost['list']) && is_array($this->arrArticlePost['list']) )
        {
            $listArticlePost1   = array_slice($this->arrArticlePost['list'], 0, 1);
            $listArticlePost2   = array_slice($this->arrArticlePost['list'], 1, 1);
            $listArticlePost3   = array_slice($this->arrArticlePost['list'], 2);
        ?>
            <div class="box_content_left no_bor" id="tintuc_euro">
                <div class="title bg_baithi">
                    <h2>Bài thi mới nhất</h2>
                    <a href="<?php echo $this->MakeUrlSite(2, array('page'=>1));?>" class="xemtatca">Xem tất cả</a> </div>
                <div class="content bg_xam">
                    <div class="tin_noibat">
                    <?php if ( !empty($listArticlePost1[0]['image']) ) {?>
                        <a href="<?php echo $this->MakeUrlSite(1, array('title'=>$listArticlePost1[0]['title'], 'id'=>$listArticlePost1[0]['articleid']));?>" title="<?php echo $this->escape($listArticlePost1[0]['title']);?>"><img src="<?php echo UPLOAD_URL_CLUB.$listArticlePost1[0]['image'];?>" align="absmiddle" width="130" height="100" title="<?php echo $this->escape($listArticlePost1[0]['title']);?>" /></a>
                    <?php }//end if?>
                        <p class="name"><a href="<?php echo $this->MakeUrlSite(1, array('title'=>$listArticlePost1[0]['title'], 'id'=>$listArticlePost1[0]['articleid']));?>" title="<?php echo $this->escape($listArticlePost1[0]['title']);?>"><?php echo $this->escape($listArticlePost1[0]['title']);?></a></p>
                        <p>Gửi bởi: <a class="widget" href="<?php echo BANBE_URL;?>/<?php echo $listArticlePost1[0]['userid'];?>/profile" rel="FPTD_<?php echo $listArticlePost1[0]['userid'];?>?sub=45" target="_blank"></a> | <?php echo $this->DateTimeDiff($listArticlePost1[0]['creation_time']);?></p>
                        <p class="detail"><?php echo Util_Truncate::truncateHTML($listArticlePost1[0]['content'], 300);?></p>
                    </div>
                <?php if ( !empty($listArticlePost2) && is_array($listArticlePost2) ) {?>
                    <div class="tinkhac">
                    <?php if ( !empty($listArticlePost2[0]['image']) ) {?>
                        <a href="<?php echo $this->MakeUrlSite(1, array('title'=>$listArticlePost2[0]['title'], 'id'=>$listArticlePost2[0]['articleid']));?>" title="<?php echo $this->escape($listArticlePost2[0]['title']);?>"><img src="<?php echo UPLOAD_URL_CLUB.$listArticlePost2[0]['image'];?>" align="absmiddle" width="53" height="53" title="<?php echo $this->escape($listArticlePost2[0]['title']);?>" /></a>
                    <?php }//end if?>
                        <p class="name"><a href="<?php echo $this->MakeUrlSite(1, array('title'=>$listArticlePost2[0]['title'], 'id'=>$listArticlePost2[0]['articleid']));?>" title="<?php echo $this->escape($listArticlePost2[0]['title']);?>"><?php echo $this->escape($listArticlePost2[0]['title']);?></a></p>
                        <p>Gửi bởi: <a class="widget" href="<?php echo BANBE_URL;?>/<?php echo $listArticlePost2[0]['userid'];?>/profile" rel="FPTD_<?php echo $listArticlePost2[0]['userid'];?>?sub=45" target="_blank"></a></p>
                    <?php if ( !empty($listArticlePost3) && is_array($listArticlePost3) ) {?>
                        <ul>
                        <?php foreach ( $listArticlePost3 as $key=>$row ) {?>
                            <li><a href="<?php echo $this->MakeUrlSite(1, array('title'=>$row['title'], 'id'=>$row['articleid']));?>" title="<?php echo $this->escape($row['title']);?>"><?php echo $this->escape($row['title']);?></a></li>
                        <?php }//end foreach?>
                        </ul>
                    <?php }//end if?>
                    </div>
                <?php }//end if?>
                </div>
            </div>
         <?php }//end if?>

            <!--Euro News API-->
         <?php if ( !empty($this->arrEuroNews) && is_array($this->arrEuroNews) ) {?>
            <div class="box_content_left" id="tintuc_euro">
                <div class="title bg_baithi">
                    <h2>Tin Tức Euro 2012</h2>
                    <a href="#" class="xemtatca">Xem tất cả</a> </div>
                <div class="content">
                    <div class="tin_noibat"> <a href="#"><img src="<?php echo IMAGE_URL_CLUB;?>/graphics/news_euro.jpg" align="absmiddle" /></a>
                        <p class="name"><a href="#">Chelsea đang lên đấu Man City đuối sức</a></p>
                        <p>Lúc 9:30</p>
                        <p class="detail">Cuộc đối đầu tối thứ tư trở nên khó lường do hai đội bóng hàng đầu Premier League có phong độ trái chiều trong thời gian gần đây. So với thời điểm chạm đáy khủng...</p>
                    </div>
                    <div class="tinkhac"> <a href="#"><img src="<?php echo IMAGE_URL_CLUB;?>/graphics/news_euro_1.jpg" align="absmiddle" /></a>
                        <p class="name"><a href="#">Pha bắt bóng vụng về của Mathlouthi đưa Ghana vào bán kết</a></p>
                        <ul>
                            <li><a href="#">Whitney Houston hát quốc ca Mỹ 'hay nhất lịch sử thể thao</a></li>
                            <li><a href="#">Hoàng Quý Phước tìm chuẩn A trên đất Mỹ</a></li>
                        </ul>
                    </div>
                </div>
            </div>
         <?php }//end if?>

            <!--Team expression-->
         <?php
         if ( !empty($this->arrTeamExpression) && is_array($this->arrTeamExpression) )
         {
             $listTeamExpression    = array_values($this->arrTeamExpression);
         ?>
            <div class="box_content_left" id="doibong_tieubieu">
                <div class="title bg_baithi">
                    <h2>Đội bóng tiêu biểu</h2>
                </div>
                <div class="content">
                    <div class="dbtb">
                     <?php if ( !empty($listTeamExpression[0]['image']) ) {?>
                        <a href="<?php echo $this->MakeUrlSite(1, array('title'=>$listTeamExpression[0]['title'], 'id'=>$listTeamExpression[0]['articleid']));?>" title="<?php echo $this->escape($listTeamExpression[0]['title']);?>"><img src="<?php echo UPLOAD_URL_CLUB.$listTeamExpression[0]['image'];?>" align="absmiddle" width="391" height="238" title="<?php echo $this->escape($listTeamExpression[0]['title']);?>" /></a>
                     <?php }//end if?>
                        <p><a href="<?php echo $this->MakeUrlSite(1, array('title'=>$listTeamExpression[0]['title'], 'id'=>$listTeamExpression[0]['articleid']));?>"><?php echo $this->escape($listTeamExpression[0]['title']);?></a></p>
                    </div>
                    <div class="info_doibong">
                    <?php if ( isset($listTeamExpression[0]['home']) ) {?>
                        <p><b>Sân nhà:</b> <?php echo $listTeamExpression[0]['home'];?></p>
                        <p><b>Huấn luyện viên:</b> <?php echo $listTeamExpression[0]['coachman'];?></p>
                    <?php
                        if ( !empty($listTeamExpression[0]['award']) )
                        {
                            $arrAward   = $this->MakeAward($listTeamExpression[0]['award']);
                    ?>
                        <p class="white"><b>Giải Thưởng</b></p>
                        <ul>
                        <?php foreach ( $arrAward as $award ) {?>
                            <li><?php echo $award;?></li>
                        <?php }//end foreach?>
                        </ul>
                    <?php
                        }//end if
                    ?>
                        <p class="white"><b>Thông tin</b></p>
                        <ul>
                            <li><?php echo nl2br(Util_Truncate::truncateHTML($listTeamExpression[0]['info_club'], 200));?></li>
                        </ul>
                        <a class="xemtatca" href="<?php echo $this->MakeUrlSite(1, array('title'=>$listTeamExpression[0]['title'], 'id'=>$listTeamExpression[0]['articleid']));?>">Xem chi tiết</a>
                    <?php } else {?>
                        <?php echo Util_Truncate::truncateHTML($listTeamExpression[0]['content'], 500, '...', false, true, false);?>
                        <a class="xemtatca" href="<?php echo $this->MakeUrlSite(1, array('title'=>$listTeamExpression[0]['title'], 'id'=>$listTeamExpression[0]['articleid']));?>">Xem chi tiết</a>
                    <?php }//end if?>
                    </div>
                </div>
            </div>
        <?php }//end if?>
        </div>
        
        <div id="col_right" class="w300 right pad_right_10">
        <?php if ( $this->scheduleOpen ) {?>
            <div class="banner_300">
                <a href="<?php echo $this->MakeUrlSite(7, null);?>"><img src="<?php echo IMAGE_URL_CLUB;?>/graphics/banner_2.jpg" align="absmiddle" /></a>
            </div>
        <?php }//end if?>
            <!--Facebook plugin box-->
            <div id="box_social_plugin">
                <div class="fb-like-box" data-href="<?php echo $this->configuration['domain']['fb']['plugins']['vne'];?>" data-width="280" data-show-faces="true" data-stream="false" data-header="true"></div>
            </div>

            <!--Euro history-->
         <?php if ( $this->arrHistoryEuro['total'] && !empty($this->arrHistoryEuro['list']) && is_array($this->arrHistoryEuro['list']) ) {?>
            <div class="box_content_right" id="tintuc_vodich">
                <h2 class="title">Vô địch Euro qua các năm</h2>
                <div class="nd">
                    <ul>
                    <?php foreach ( $this->arrHistoryEuro['list'] as $key=>$row ) {?>
                        <li>
                        <?php if ( !empty($row['image']) ) {?>
                            <a class="pics" href="<?php echo $this->MakeUrlSite(1, array('title'=>$row['title'], 'id'=>$row['articleid']));?>" title="<?php echo $this->escape($row['title']);?>"><img src="<?php echo UPLOAD_URL_CLUB.$row['image'];?>" align="absmiddle" width="53" height="53" title="<?php echo $this->escape($row['title']);?>" /></a>
                        <?php }//end if?>
                            <p class="news_title"><a href="<?php echo $this->MakeUrlSite(1, array('title'=>$row['title'], 'id'=>$row['articleid']));?>" title="<?php echo $this->escape($row['title']);?>"><?php echo $this->escape($row['title']);?></a></p>
                        </li>
                    <?php }//end foreach?>
                    </ul>
                    <p class="view_all"><a href="<?php echo $this->MakeUrlSite(6, array('page'=>1));?>">Xem tất cả</a></p>
                </div>
            </div>
        <?php }//end if?>
            <!-- InstanceEndEditable -->
        </div>
    </div>
</div>
<script type="text/javascript">
var totalArticleHot = parseInt('<?php echo (!empty($this->arrArticleHot) && is_array($this->arrArticleHot))?count($this->arrArticleHot):0?>');
</script>